<?php /* Smarty version Smarty-3.1.18, created on 2017-07-22 21:22:51
         compiled from "/Applications/MAMP/htdocs/PHP/jifenshop/protected/template/gm/order.index.html" */ ?>
<?php /*%%SmartyHeaderCode:738575495597350b8d4d299-80048641%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '4996292fb321972843718d26e4e0afec8b286c51' => 
    array (
      0 => '/Applications/MAMP/htdocs/PHP/jifenshop/protected/template/gm/order.index.html',
      1 => 1500729769,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '738575495597350b8d4d299-80048641',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_597350b8f00ef3_74862519',
  'variables' => 
  array (
    'where' => 0,
    'admin' => 0,
    'integral_order' => 0,
    'keyword' => 0,
    'pay_method' => 0,
    'status' => 0,
    'shops' => 0,
    'shop' => 0,
    'shop_id' => 0,
    'is_jiesuan' => 0,
    'rs' => 0,
    'row' => 0,
    'goods' => 0,
    'paid_price' => 0,
    'yue_paid_price' => 0,
    'page' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_597350b8f00ef3_74862519')) {function content_597350b8f00ef3_74862519($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_truncate')) include '/Applications/MAMP/htdocs/PHP/jifenshop/framework/class/smarty-3.1.18/libs/plugins/modifier.truncate.php';
if (!is_callable('smarty_modifier_date_format')) include '/Applications/MAMP/htdocs/PHP/jifenshop/framework/class/smarty-3.1.18/libs/plugins/modifier.date_format.php';
?><?php echo $_smarty_tpl->getSubTemplate ("header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>


<div class="page-header">
	<h6>
		订单管理
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			订单列表
		</small>
		<div style="text-align:right">
			<a href="?app=order&act=export&where=<?php echo $_smarty_tpl->tpl_vars['where']->value;?>
" target="_blank">导出到EXCEL</a>
			<?php if ($_smarty_tpl->tpl_vars['admin']->value->id==4||$_smarty_tpl->tpl_vars['admin']->value->id==5) {?>
			<a href="?app=order&act=shop_ranks" target="_blank">门店收入排行</a>
			<?php }?>
		</div>
	</h6>
</div><!-- /.page-header -->

<form class="form-inline" action="?" method="get" style="padding-bottom:5px;">
<input type="hidden" name="app" id="app" value="order" />
<input type="hidden" name="act" id="act" value="index" />
<input type="hidden" name="integral_order" id="integral_order" value="<?php echo $_smarty_tpl->tpl_vars['integral_order']->value;?>
" />

关键词：<input type="text" class="input-medium" placeholder="会员名称/地址/电话/单号等" name="keyword" value="<?php echo $_smarty_tpl->tpl_vars['keyword']->value;?>
" style="width:250px;" />
<!--
<select name="pay_method" id="pay_method" class="form-control">
	<option value=""> 支付方式 </option>
	<option value="wxpay" <?php if ($_smarty_tpl->tpl_vars['pay_method']->value=="wxpay") {?>selected<?php }?>>APP内微信支付</option>
	<option value="wxpay_h5" <?php if ($_smarty_tpl->tpl_vars['pay_method']->value=="wxpay_h5") {?>selected<?php }?>>服务号内支付</option>
	<option value="alipay" <?php if ($_smarty_tpl->tpl_vars['pay_method']->value=="alipay") {?>selected<?php }?>>支付宝支付</option>
</select>
-->
<select name="status" id="status" class="form-control">
	<option value=""> 订单状态 </option>
	<option value="0" <?php if ($_smarty_tpl->tpl_vars['status']->value=="0") {?>selected<?php }?>>未支付</option>
	<option value="1" <?php if ($_smarty_tpl->tpl_vars['status']->value==1) {?>selected<?php }?>>已支付</option>
	<option value="2" <?php if ($_smarty_tpl->tpl_vars['status']->value==2) {?>selected<?php }?>>已发货</option>
	<option value="3" <?php if ($_smarty_tpl->tpl_vars['status']->value==3) {?>selected<?php }?>>完成（已收货）</option>
	<option value="4" <?php if ($_smarty_tpl->tpl_vars['status']->value=="4") {?>selected<?php }?>>已完成（已评价）</option>
	<option value="-1" <?php if ($_smarty_tpl->tpl_vars['status']->value==-1) {?>selected<?php }?>>已取消</option>
	<option value="-2" <?php if ($_smarty_tpl->tpl_vars['status']->value==-2) {?>selected<?php }?>>已退款</option>
	<option value="-3" <?php if ($_smarty_tpl->tpl_vars['status']->value==-3) {?>selected<?php }?>>已退货</option>
</select>
<!--
<select name="shop_id" id="shop_id" class=" form-control "  data-live-search="true" style="line-heght:30px;">
	<option value=""> 门店 </option>
	<?php  $_smarty_tpl->tpl_vars['shop'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['shop']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['shops']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['shop']->key => $_smarty_tpl->tpl_vars['shop']->value) {
$_smarty_tpl->tpl_vars['shop']->_loop = true;
?>
	<option value="<?php echo $_smarty_tpl->tpl_vars['shop']->value->id;?>
" <?php if ($_smarty_tpl->tpl_vars['shop']->value->id==$_smarty_tpl->tpl_vars['shop_id']->value) {?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['shop']->value->name;?>
</option>
	<?php } ?>
</select>
-->
<!-- <select name="is_jiesuan" id="is_jiesuan" class="form-control">
	<option value=""> 结算状态 </option>
	<option value="0" <?php if ($_smarty_tpl->tpl_vars['is_jiesuan']->value=="0") {?>selected<?php }?>>未结算</option>
	<option value="1" <?php if ($_smarty_tpl->tpl_vars['is_jiesuan']->value==1) {?>selected<?php }?>>已结算</option>
</select> -->

<button type="submit" class="btn btn-info btn-sm">
	<i class="ace-icon fa fa-search bigger-110"></i>搜索
</button>
<button type="button" class="btn btn-sm" onclick="javascript:self.location='?app=order&act=index'">
	<i class="ace-icon fa fa-undo bigger-110"></i>复位
</button>

</form>

<table id="simple-table" class="table table-striped table-bordered table-hover">
	<thead>
		<tr>
			<th>ID</th>
			<th>订单单号</th>
			<th>商品</th>
			<!-- <th>商品名称</th>
			<th>数量</th>
			<th>价格</th> -->
			<!-- <th>门店</th> -->
			<th>下单人</th>
			<th>电话</th>
			<th>服务地址</th>
			<th><?php if ($_smarty_tpl->tpl_vars['integral_order']->value==1) {?>总积分<?php } else { ?>总价/元<?php }?></th>
			<!-- <th>佣金支付/元</th> -->
			<!-- <th>优惠劵支付/元</th> -->
			<!-- <th>余额支付/元</th> -->
			<th>支付方式</th>
			<th>状态</th>
			<th>下单时间</th>
			<th>操作</th>
		</tr>
	</thead>

	<tbody>
		<?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['rs']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['row']->key => $_smarty_tpl->tpl_vars['row']->value) {
$_smarty_tpl->tpl_vars['row']->_loop = true;
?>
		<tr>
			<td><?php echo $_smarty_tpl->tpl_vars['row']->value['id'];?>
</td>
			<td>
			<a href="?app=order&act=edit&order_id=<?php echo $_smarty_tpl->tpl_vars['row']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['row']->value['order_sn'];?>
</a></td>
			<td style="min-width:450px;">
				<?php  $_smarty_tpl->tpl_vars['goods'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['goods']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['row']->value['goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['goods']->key => $_smarty_tpl->tpl_vars['goods']->value) {
$_smarty_tpl->tpl_vars['goods']->_loop = true;
?>
				<img src="<?php if ($_smarty_tpl->tpl_vars['goods']->value->goods_pic!=='') {?><?php echo $_smarty_tpl->tpl_vars['goods']->value->goods_pic;?>
<?php } else { ?>/images/nopic.png<?php }?>" style="width:100px;">
			<!-- 	<span>名称：<?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['goods']->value->goods_name,10);?>
 &nbsp; </span>
				<span>数量：<?php echo $_smarty_tpl->tpl_vars['goods']->value->quantity;?>
 &nbsp; </span>
				<span>价格：<?php echo $_smarty_tpl->tpl_vars['goods']->value->price;?>
 &nbsp; </span><br/> -->
				<?php }
if (!$_smarty_tpl->tpl_vars['goods']->_loop) {
?>
				<?php } ?>
			</td>

			<!-- <td>
				<a href="?app=shop&act=index&shop_id=<?php echo $_smarty_tpl->tpl_vars['row']->value['shop_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['row']->value['shop_name'];?>
</a>
			</td> -->
			<td><a href="?app=member&act=index&member_id=<?php echo $_smarty_tpl->tpl_vars['row']->value['member_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['row']->value['member_name'];?>
</a></td>
			<td><?php echo $_smarty_tpl->tpl_vars['row']->value['mobile'];?>
</td>
			<td><?php echo $_smarty_tpl->tpl_vars['row']->value['address'];?>
</td>
			<td><?php if ($_smarty_tpl->tpl_vars['integral_order']->value==1) {?><?php echo intval($_smarty_tpl->tpl_vars['row']->value['total_price']);?>
<?php } else { ?><?php echo $_smarty_tpl->tpl_vars['row']->value['total_price'];?>
<?php }?></td>
			<!-- <td><?php echo $_smarty_tpl->tpl_vars['row']->value['used_commission'];?>
</td> -->
			<!-- <td><?php echo $_smarty_tpl->tpl_vars['row']->value['used_coupon'];?>
</td> -->
			<!-- <td><?php echo $_smarty_tpl->tpl_vars['row']->value['used_money'];?>
</td> -->
			<td align="center">
				<?php if ($_smarty_tpl->tpl_vars['row']->value['pay_method']=='wxpay') {?>APP内微信支付
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value['pay_method']=='wxpay_h5') {?>服务号内支付
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value['pay_method']=='alipay') {?>支付宝支付
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value['pay_method']=='integral') {?>积分兑换<?php }?></td>
			<td align="center">
				<?php if ($_smarty_tpl->tpl_vars['row']->value['status']==0) {?>未支付
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value['status']==1) {?>已支付
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value['status']==2) {?>已发货
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value['status']==3) {?>完成（已收货）
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value['status']==4) {?>完成（已评价）
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value['status']==-1) {?>取消
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value['status']==-2) {?>退款
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value['status']==-3) {?>退货<?php }?></td>
			<td><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['row']->value['add_time'],"%Y-%m-%d");?>
</td>
			<td>
				<a href="?app=order&act=edit&order_id=<?php echo $_smarty_tpl->tpl_vars['row']->value['id'];?>
">
					<button class="btn btn-xs btn-info">
					<i class="ace-icon fa fa-pencil bigger-120"></i>
				</button>
				</a>
				
				<a href="?app=order&act=print_order&order_id=<?php echo $_smarty_tpl->tpl_vars['row']->value['id'];?>
" class="">
					<button class="btn btn-xs ">
					<i class="ace-icon fa fa-print bigger-120"></i>
				</button>
				</a>
				
			</td>
		</tr>
		<?php }
if (!$_smarty_tpl->tpl_vars['row']->_loop) {
?>
		<tr bgcolor="white"><td colspan="13" height="50">暂无记录</td></tr>
		<?php } ?>
		
	</tbody>
</table>
	<div class="mypage" style="text-align:right">
			<!--已支付金额：￥<?php echo $_smarty_tpl->tpl_vars['paid_price']->value;?>
元 &nbsp;    余额支付金额：￥<?php echo $_smarty_tpl->tpl_vars['yue_paid_price']->value;?>
元 &nbsp; -->
			共 <?php echo $_smarty_tpl->tpl_vars['page']->value['num_records'];?>
 个记录  <?php echo $_smarty_tpl->tpl_vars['page']->value['current_page'];?>
 / <?php echo $_smarty_tpl->tpl_vars['page']->value['num_pages'];?>
 页  <?php echo $_smarty_tpl->tpl_vars['page']->value['first_page'];?>
 <?php echo $_smarty_tpl->tpl_vars['page']->value['prev'];?>
 <?php echo $_smarty_tpl->tpl_vars['page']->value['nav'];?>
 <?php echo $_smarty_tpl->tpl_vars['page']->value['next'];?>
 <?php echo $_smarty_tpl->tpl_vars['page']->value['last_page'];?>

	</div>
<?php echo $_smarty_tpl->getSubTemplate ("footer.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>


<script>
$(function(){
	$('#begin_date').datepicker({
		useStyle:'datepicker2',
		readonly:false,
		showTime:false,
		showSecond:false,
		format:'yyyy-mm-dd'
	});
	$('#end_date').datepicker({
		useStyle:'datepicker2',
		readonly:false,
		showTime:false,
		showSecond:false,
		format:'yyyy-mm-dd'
	});
});
</script>
<script>

	$(window).on('load', function () {

            $('.selectpicker').selectpicker({
                'selectedTexselectpickert': 'cat'
            });

            // $('.selectpicker').selectpicker('hide');
        });

</script>

<?php }} ?>
